home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
476-500
/
disk_499
/
diglib
/
diglib.lzh
/
source
/
GSRST.for
< prev
next >
Wrap
Text File
|
1991-04-13
|
817b
|
34 lines
SUBROUTINE GSRST(XV,YV,XA,YA)
IMPLICIT NONE
REAL*4 XV,YV,XA,YA,XTEMP
C
C
INCLUDE DIGLIB$KOM:GCDPRM.PRM
C
C ROTATE, SCALE, AND THEN TRANSLATE COORDINATES
C (TAKE VIRT. COORD. INTO SCREEN COORD.)
C
XTEMP = XV
XA = XS*(RCOS*XTEMP+RSIN*YV) + XT
YA = YS*(RCOS*YV-RSIN*XTEMP) + YT
RETURN
END
SUBROUTINE GSIRST(XA,YA,XV,YV)
IMPLICIT NONE
REAL*4 XA,YA,XV,YV,XTEMP
C
C INVERSE ROTATE, SCALE, AND THEN TRANSLATE
C (TAKE ABSOLUTE COORD. INTO VIRTUAL COORD.)
C
INCLUDE DIGLIB$KOM:GCDPRM.PRM
C
C CONVERT ABSOLUTE CM. COORD. TO VIRTUAL CM. COORDINATES
C
XTEMP = (XA-XT)/XS
YV = (YA-YT)/YS
XV = RCOS*XTEMP-RSIN*YV
YV = RCOS*YV+RSIN*XTEMP
RETURN
END